﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using RoRoWo.Domain;

namespace RoRoWo.Data
{
    public class BlogArticleRespository
    {
        private ISession _session;
        public ISession Session
        {
            set
            {
                _session = value;
            }
        }

        public BlogArticleRespository(ISession session)
        {
            _session = session;
        }

        public Blogarticle GetById(int Id)
        {

            return _session.Get<Blogarticle>(Id);
        }

        public void Create(Blogarticle dto)
        {
            _session.Save(dto);
            _session.Flush();
        }


    }


}
